﻿using System;
using System.Collections.Generic;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.Action.Dao
{
    public class ActionMetaDataMethodLogic : IActionMetaDataMethodDao
    {
        //IActionMetaDataMethodDao actionMetaDataMethodDao = DaoService.GetInstance("sqlmap_FAS_Action").GetDao<IActionMetaDataMethodDao>();

        IActionMetaDataMethodDao actionMetaDataMethodDao = DaoFactory.GetDaoFactory<IActionMetaDataMethodDao>().Instance;
        public void AddActionMetaDataMethod(ActionMetaDataMethod method)
        {
            actionMetaDataMethodDao.AddActionMetaDataMethod(method);
        }

        public void DeleteActionMetaDataMethod(string methodID)
        {
            actionMetaDataMethodDao.DeleteActionMetaDataMethod(methodID);
        }

        public List<ActionMetaDataMethod> GetActionMetaDataMethodByFilter(Dictionary<string,string> filter)
        {
            return actionMetaDataMethodDao.GetActionMetaDataMethodByFilter(filter);
        }

        public ActionMetaDataMethod GetActionMetaDataMethodByID(string methodID)
        {
            return actionMetaDataMethodDao.GetActionMetaDataMethodByID(methodID);
        }

        public void UpdateActionMetaDataMethod(ActionMetaDataMethod method)
        {
            actionMetaDataMethodDao.UpdateActionMetaDataMethod(method);
        }
    }
}
